package com.itheima.Test;

public class Test012 {
    public static void main(String[] args) {
        int method = method(2);
        System.out.println(method);

    }
    public static int method(int num ){
        if(num ==1){
            return  1;
        }
        return method(num-1)+num;
    }
}
